/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dameki.ki;

import dameki.core.Controller;
import dameki.game.GameMove;
import dameki.game.Stone;
import dameki.game.player.IPlayer;
import java.util.ArrayList;

/**
 *
 * @author Tobi
 */
public class AgentPlayer implements IPlayer{

    public AgentPlayer(boolean color){
        this.color = color;
        player_stones = new ArrayList<>();
        this.col = color?1:-1;
        this.calc = new AgentCalculator(3);
    }
    
    private ArrayList<Stone> player_stones;
    private boolean color;
    private Controller control;
    private Stone[][] field;
    public final int col;
    private AgentCalculator calc;
    
    @Override
    public GameMove[] move(Stone[][] field) {
        return calc.getMove(this, field);        
    }

    @Override
    public boolean getColor() {
        return this.color;
    }

    @Override
    public String getColorString() {
        if (color) {
            return "White";
        } else {
            return "Black";
        }
    }

    @Override
    public void setController(Controller control) {
        this.control =  control;
    }

    @Override
    public void setStoneList(ArrayList<Stone> stones) {
        this.player_stones = stones;
    }

    public ArrayList<Stone> getStoneList(){
        return this.player_stones;
    }
    
}
